#ifndef GAMEGATEBUS_H
#define GAMEGATEBUS_H
#include "message_queue.h"

class CGameGateBus
{
public:

	static CGameGateBus& instance()
	{
		static CGameGateBus obj;
		return obj;
	}
	bool OpenBus();

	bool SendToGate(const char* buf, unsigned int len);
	bool RecvFromGate(char* buf, unsigned int buf_len, unsigned &len);

	bool SendToGame(const char* buf, unsigned int len);
	bool RecvFromGame(char* buf, unsigned int buf_len, unsigned &len);

private:
	CGameGateBus();
	~CGameGateBus();

	CMessageQueue m_gate2game;
	CMessageQueue m_game2gate;
};

#endif